{
  "properties" : { },
  "id" : "6aeae3d7161c45bcb2477ff5ed67b0a3",
  "script" : null,
  "groupId" : "5affd458495e4bf8a43e1f578f0ce3a9",
  "name" : "查询地区对应告警详细信息",
  "createTime" : 1727070954256,
  "updateTime" : 1726712562150,
  "lock" : "",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "mapLevel",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"current\": 1,\r\n    \"size\": 10,\r\n    \"regionId\":61\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 0,\n        \"current\": 1,\n        \"size\": 10,\n        \"records\": \"\"\n    }\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "current",
      "value" : "1",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "size",
      "value" : "10",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "regionId",
      "value" : "61",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "code",
      "value" : "500",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "success",
      "value" : "false",
      "description" : "",
      "required" : false,
      "dataType" : "Boolean",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Object",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "msg",
      "value" : "系统维护中，请稍后重试。",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
sql = """
 SELECT websocket.*,device.device_name,ALARM_METRIC ALARM_STRATEGY_NAME,type.TYPE_NAME ALARM_TYPE_VALUE, alarmlevel.LEVEL_NAME alarm_level
        FROM alarm_websocket websocket,
             ndmp_device device,
             alarm_type type,
             alarm_level alarmlevel
        WHERE websocket.ALARM_TARGET = device.id AND websocket.ALARM_TYPE_NAME = type.CODE AND alarmlevel.LEVEL = websocket.LEVEL_ID
          and  websocket.LEVEL_ID  < 6
          AND websocket.is_solved = 1
          and websocket.ALARM_TARGET in (
            SELECT ndmp_device.ID
            FROM ndmp_map,
                 ndmp_device
            WHERE ndmp_map.dept_id = ndmp_device.DCC_ID
              AND region_code IN (
                SELECT code
                FROM blade_region
                WHERE FIND_IN_SET((#{body.regionId}), ancestors) > 0
                   or code = #{body.regionId}))
"""
return db.page(sql,body.size,body.current-1)